package com.luguz.controller;

import com.luguz.common.Result;
import org.springframework.stereotype.Controller;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.ArrayList;

/**
 * @author Guz
 * @create 2022-02--25 23:08
 */
@Controller
@ResponseBody
//@CrossOrigin(origins = "http://localhost:8080", maxAge = 3600)
public class IndexController {
    @GetMapping("/index/getBar")
    private Object getBar(){
        ArrayList bar = new ArrayList<>();
        bar.add("首页");
        return Result.succ(bar);
    }
    @PostMapping("/api/getPostBar")
    private Object getPostBar(){
        ArrayList bar = new ArrayList<>();
        bar.add("首页");
        return Result.succ(bar);
    }
}
